package test3;

public class A3 {
    public static void main(String[] args) {
            // 创建学院
            School mySchool = new School();
            // 创建系和指导教师
            Department department1 = new Department("Computer Science");
            Department department2 = new Department("Mathematics");

            Instructor instructor1 = new Instructor("John Doe");
            Instructor instructor2 = new Instructor("Jane Smith");

            // 创建课程
            Subject subject1 = new Subject("Introduction to Programming");
            Subject subject2 = new Subject("Calculus");

            // 创建学生
            Student student1 = new Student("Alice");
            Student student2 = new Student("Bob");

            // 建立关系
            mySchool.addDepartment(department1);
            mySchool.addDepartment(department2);

            department1.addInstructor(instructor1);
            department2.addInstructor(instructor2);

            department1.addSubject(subject1);
            department2.addSubject(subject2);

            mySchool.addStudent(student1);
            mySchool.addStudent(student2);

            // 打印学院的信息
            System.out.println("School Departments:");
            for (Department department : mySchool.getDepartments()) {
                System.out.println("Department: " + department.getName());
                System.out.println("Instructors: " + department.getInstructors().size());
                System.out.println("Subjects: " + department.getSubjects().size());
                System.out.println("---------------");
            }

            System.out.println("School Students: " + mySchool.getStudents().size());
        }
}











